{literal}
<script language="Javascript1.2"><!-- // load htmlarea
_editor_url = "html_area/";                     // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
  document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
  document.write(' language="Javascript1.2"></scr' + 'ipt>');  
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// --></script>
<script>
function cambiar(esto)
{
	vista=document.getElementById(esto).style.display;
	if (vista=='none')
		vista='block';
	else
		vista='none';

	document.getElementById(esto).style.display = vista;
}

</script>
{/literal}

 	<form method="POST" action="{$conf.html}/edit_survey.php" name="qform" enctype="multipart/form-data">
    <input type="hidden" name="mode" value="{$data.mode}">
    <input type="hidden" name="sid" value="{$data.sid}">
    <input type="hidden" name="qid" value="{$data.qid}">
    <input type="hidden" name="img_path_actual" value="{$data.question_data.img_path}">
<table  width="953" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->

 
  <tr>
    <td width="15" height="100%" valign="top" ><!--DWLayoutEmptyCell-->&nbsp;</td>
    <td width="936" valign="top"><table  width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="471" height="183" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr>
            <td width="421" height="24">&nbsp;</td>
                  <td width="50">&nbsp;</td>
                </tr>
          <tr>
            <td height="36" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <td width="421" height="36" valign="top"><strong>Texto
                  de la Pregunta.</strong> Ingrese el texto de la pregunta, use el nuevo formulario de preguntas para agregar roturas dentro de tu formulario, las preguntas no pueden ser editadas dentro de una llamada por rotura. </td>
                      </tr>
              </table></td>
                  <td>&nbsp;</td>
                </tr>
          <tr>
            <td height="99" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <td width="421" height="99" valign="top">
                  <textarea name="question" wrap="physical" cols="50" rows="6">{$data.question_data.question}</textarea>
                  {literal} 
                  <script language="javascript1.2">
					editor_generate('question');
					</script>
                  {/literal}				</td>
                      </tr>
              
              
              </table></td>
                  <td>&nbsp;</td>
                </tr>
          <tr>
            <td height="24">&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
          
          
          
          
          </table></td>
            <td width="465" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                <!--DWLayoutTable-->
                <tr>
                  <td width="235" height="81">&nbsp;</td>
                  <td width="205">&nbsp;</td>
                  <td width="25">&nbsp;</td>
                </tr>
                <tr>
                  <td height="78" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <!--DWLayoutTable-->
                    <tr>
                      <td width="235" height="54" valign="top"><div align="justify">para agregar una Imagen a la Pregunta de clic al boton
                        y seleccione una imagen de su Pc. 
                        Imagen max 20KB-peso 120x50-medida tipo .gif .jpg .jpeg .png</div></td>
                      </tr>
                    <tr>
                      <td height="24" valign="top"><input name="Imagen" type="file" size="20"></td>
                      </tr>
                    
                  </table></td>
                  <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <!--DWLayoutTable-->
                    <tr>
                      <td width="205" height="78">{if $data.question_data.img_path neq ""}
	    	<img src="html_image_q/{$data.question_data.img_path}">
		{/if}

		 {if $data.question_data.img_path neq ""}<input type="checkbox" name="delete_image" value="1">&nbsp;Deleted Image{/if}</td>
                    </tr>
                  </table>
                  </td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td height="24">&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                
                
                
            </table>            </td>
          </tr>
      
      <tr>
        <td height="94" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr>
            <td width="421" height="72" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <td width="173" height="36" valign="top" title="indica cuantos grupos de respuestas tendra esta pregunta"><strong>Numeros de Bloques
                  de Respuesta</strong></td>
                        <td width="56" valign="top"><select name="num_answers" size="1">
        {section name="num_answers" loop=$data.num_answers show=TRUE}
          <option value="{$data.num_answers[num_answers]}"{$data.num_answers_selected[num_answers]}>{$data.num_answers[num_answers]}</option>
        {/section}
      </select></td>
                        <td width="18" rowspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                        <td width="60" valign="top" title="indica la orientacion que tendran las respuestas"><strong>Orientacion</strong></td>
                        <td width="114" valign="top"><select name="orientation" size="1">
        {section name="orient" loop=$conf.orientation show=TRUE}
          <option value="{$conf.orientation[orient]}"{$data.orientation.selected[orient]}>{$conf.orientation[orient]}</option>
        {/section}
      </select></td>
                      </tr>
              <tr>
                <td height="36" valign="top" title="indica el numero de respuestas que se podran elegir"><strong>Respuestas
                  Requeridas</strong></td>
                        <td valign="top"><select name="num_required" size="1">
        {section name="num_required" loop=$data.num_required show=TRUE}
          <option value="{$data.num_required[num_required]}"{$data.num_required_selected[num_required]}>{$data.num_required[num_required]}</option>
        {/section}
      </select></td>
                        <td colspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                      </tr>
              
              </table></td>
                  <td width="515">&nbsp;</td>
                </tr>
          <tr>
            <td height="22">&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
          
          
          
          </table></td>
          </tr>
		  {section name="show_edep" loop=1 show=$data.edep.dep_id}
      <tr>
        <td height="45" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr>
            <td width="421" height="32" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <td width="421" height="32" valign="top">
				 {section name="edep" loop=$data.edep.dep_id show=TRUE}
				   <input type="checkbox" name="edep_id[]" value="{$data.edep.dep_id[edep]}">
                   {$data.edep.option[edep]} if question {$data.edep.qnum[edep]} is {$data.edep.value[edep]}
				 {/section}
				  </td>
                      </tr>
              </table></td>
                  <td width="515">&nbsp;</td>
                </tr>
          <tr>
            <td height="13"></td>
                  <td></td>
                </tr>
          
          
          </table></td>
          </tr>
		  {/section}
		  
      <tr>
        <td  colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
		  {section name="dep" loop=1 show=$data.qnum}
          <tr>
            <td width="648" height="104" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <td height="14" colspan="2" valign="top"><strong>Nueva Dependencia</strong></td>
                      </tr>
              <tr>
                <td width="309" height="27" valign="top">({$smarty.section.dep.iteration})
                  <select name="option[{$smarty.section.dep.iteration}]" size="1">
        <option value=""></option>
        {section name="dep_mode" loop=$conf.dependency_modes show=TRUE}
          <option value="{$conf.dependency_modes[dep_mode]}">{$conf.dependency_modes[dep_mode]}</option>
        {/section}
      </select>
                  si pregunta 
                  <select name="dep_qid[{$smarty.section.dep.iteration}]" onchange="populate({$smarty.section.dep.iteration});">
        <option value=""></option>
        {section name="dep_qid" loop=$data.dep_qid show=TRUE}
          <option value="{$data.dep_qid[dep_qid]}">{$data.dep_qnum[dep_qid]}</option>
        {/section}
      </select>
                  es Respondida con </td>
                        <td width="339" rowspan="2" valign="top">
						<select name="dep_aid[{$smarty.section.dep.iteration}][]" size="5" MULTIPLE>
                        <option value="">>>elegir n&uacute;mero de pregunta para ver respuestas<<</option>
                        </select>
		 <script language="javascript">

        Answers = new Array;
        Values = new Array;
        Num_Answers = new Array;
        var Original_Length = 1;

        //Javascript from survey.class.php
        {$data.js}

        var num = 0;

        function populate(num)
        {ldelim}
          for(x=0;x<Original_Length;x++)
          {ldelim} document.qform['dep_aid['+num+'][]'].options[0] = null; {rdelim}

          qid = document.qform['dep_qid['+num+']'].value;

          for(x=0;x<Num_Answers[qid];x++)
          {ldelim} document.qform['dep_aid['+num+'][]'].options[x] = new Option(Values[qid+','+x],Answers[qid+','+x]); {rdelim}

          Original_Length = Num_Answers[qid];
        {rdelim}
      </script>
	  </td>
                      </tr>
              <tr>
                <td height="63" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                      </tr>
              
              
              
              </table></td>
                  <td width="288">&nbsp;</td>
                </tr>
				{/section}
          <tr>
            <td height="14"></td>
                  <td></td>
                </tr>
          
          
          </table></td>
          </tr>
		  
      <tr>
        <td height="29" colspan="2" align="center" valign="middle">
		  <input type="submit" name="edit_question_submit" value="Guardar Cambios">
          <input type="submit" name="edit_cancel" value="cancelar">
		  </td>
          </tr>
      <tr>
        <td height="24">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
      
      
    </table></td>
  </tr>
</table>
</form>
